//
//  UIDatePicker+Chained.m
//  ObjectCChained
//
//  Created by sny on 2018/5/30.
//  Copyright © 2018年 HuangYangYang. All rights reserved.
//

#import "UIDatePicker+Chained.h"

@implementation UIDatePicker (Chained)

- (UIDatePicker *(^)(UIDatePickerMode))chainedUIDatePickerModel {
    return ^UIDatePicker *(UIDatePickerMode datePickerMode) {
        self.datePickerMode = datePickerMode;
        return self;
    };
}

- (UIDatePicker *(^)(NSTimeInterval ,NSInteger ))chainedUIDatePickerAnimationSet {
    return ^UIDatePicker *(NSTimeInterval countDownDuration,NSInteger minuteInterval) {
        self.countDownDuration = countDownDuration;
        self.minuteInterval = minuteInterval;
        return self;
    };
}

- (UIDatePicker *(^)(NSDate *,NSDate *,NSDate *))chainedUIDatePickerDateSet {
    return ^UIDatePicker *(NSDate *minimumDate,NSDate *maximumDate,NSDate *date) {
        if (minimumDate) {self.minimumDate = minimumDate;}
        if (maximumDate) {self.maximumDate = maximumDate;}
        if (date) {self.date = date;}
        return self;
    };
}

#pragma mark - setter

- (void)setChainedUIDatePickerModel:(UIDatePicker *(^)(UIDatePickerMode))chainedUIDatePickerModel {}

- (void)setChainedUIDatePickerDateSet:(UIDatePicker *(^)(NSDate *, NSDate *, NSDate *))chainedUIDatePickerDateSet {}

- (void)setChainedUIDatePickerAnimationSet:(UIDatePicker *(^)(NSTimeInterval, NSInteger))chainedUIDatePickerAnimationSet {}

@end
